import request from '@/utils/request'

// 查询电子旧图片列表
export function listOldepicture(query) {
  return request({
    url: '/system/oldepicture/list',
    method: 'get',
    params: query
  })
}

// 查询电子旧图片详细
export function getOldepicture(id) {
  return request({
    url: '/system/oldepicture/' + id,
    method: 'get'
  })
}

// 新增电子旧图片
export function addOldepicture(data) {
  return request({
    url: '/system/oldepicture',
    method: 'post',
    data: data
  })
}

// 修改电子旧图片
export function updateOldepicture(data) {
  return request({
    url: '/system/oldepicture',
    method: 'put',
    data: data
  })
}

// 删除电子旧图片
export function delOldepicture(id) {
  return request({
    url: '/system/oldepicture/' + id,
    method: 'delete'
  })
}

// 获取图片二进制文件
export function getOldPic(data) {
  return request({
    url: '/system/oldepicture/getOldPic',
    method: 'post',
    data: data,
    responseType:'arraybuffer'
  })
}


// 下载图片二进制文件
export function downloadPic(data) {
  return request({
    url: '/system/oldepicture/downloadOldPic',
    method: 'post',
    data: data,
    responseType:'arraybuffer'
  })
}
export function downloadOldMore(ids) {
  return request({
    url: '/system/oldepicture/downloadOldMore/' + ids,
    method: 'get',
    responseType:'arraybuffer'
  })
}
